Sheet: (1, 0) Dialog (1, 6) Add to Program Manager (2, 0) (2, 1) 5 (2, 2) 10 (2, 3) 6 (2, 6) Add Item to Program Manager: (3, 1) 5 (3, 2) 42 (3, 3) 25 (3, 6) &Filename: (4, 1) 6 (4, 2) 155 (4, 3) 22 (4, 4) 400 (4, 7) C:\EXCEL\DATA\ADDTOPM.XLM (4, 8) (5, 1) 5 (5, 2) 42 (5, 3) 46 (5, 6) &Title: (5, 7) (5, 8) (6, 1) 6 (6, 2) 155 (6, 3) 43 (6, 4) 400 (6, 7) addtopm (6, 8) (7, 1) 5 (7, 2) 42 (7, 3) 67 (7, 6) &Group: (7, 7) (7, 8) (8, 1) 6 (8, 2) 155 (8, 3) 64 (8, 4) 400 (8, 7) Worksheets (8, 8) Worksheets (9, 1) 5 (9, 2) 42 (9, 3) 88 (9, 6) &Icon File: (9, 7) (9, 8) (10, 1) 6 (10, 2) 155 (10, 3) 85 (10, 4) 400 (10, 7) C:\WINDOWS\ICONS\XLM.ICO (10, 8) C:\WINDOWS\ICONS\XLM.ICO (11, 1) 13 (11, 2) 210 (11, 3) 112 (11, 6) &Save Changes (11, 7) TRUE (11, 8) (12, 1) 1 (12, 2) 177 (12, 3) 134 (12, 4) 88 (12, 6) &OK (13, 1) 2 (13, 2) 291 (13, 3) 134 (13, 4) 88 (13, 6) &Cancel (15, 0) AddToProgMan (15, 2) Get the filename (16, 2) If blank, then report error (17, 2) set title (18, 2) get old group (19, 2) get old icon (20, 2) get old save status (21, 2) if no icon, just do dialog (22, 0) FileExtension (22, 2) get extension of excel file (23, 0) IconFileName (23, 2) parse existing icon name (24, 2) if it is XL?.ICO, adjust to match current file, otherwise set to "" (25, 0) ReturnValue (25, 2) do the dialog (26, 2) if Cancel, then quit (27, 2) if no save, then don't (28, 2) copy group (29, 2) copy icon (30, 0) OldFile (31, 2) turn off echo (33, 2) ... or save has changed (35, 2) turn echo back on (36, 0) Channel (36, 2) Start progman DDE (37, 2) Create if necessary (38, 2) minimize group (39, 2) restore group (40, 0) Command (41, 2) add item to group (42, 2) minimize group (43, 2) close channel (44, 2) return (46, 0) NoFileName (49, 0) Path (49, 1) C:\WIN\ICONS\ (50, 0) BaseName (50, 1) XLM (51, 0) Extension (51, 1) ICO (53, 0) ParseFileName (53, 2) return string (54, 2) one argument, a string (55, 2) initialize path, (56, 2) ... base filename, and (57, 2) ... and extension (58, 2) if no name, return "" (59, 2) any "\"'s? (60, 0) WhereIsSlash (60, 2) is so, add stuff before (61, 2) ... to path and ... (62, 2) ... remove it from name (64, 0) WhereIsPeriod (64, 2) any extension? (65, 2) if not, return name (66, 2) if so, get extension (67, 2) trim off extension (68, 2) and return base name